#include"RBTree.h"

template<class K, class V>
class MyMap
{
public:
	struct Mapgetfirst
	{
		const K& operator() (const pair<K, V>& s)
		{
			return s.first;
		}
	};
	typedef RBTree<K, pair<K, V>, Mapgetfirst> myMap;
	typedef typename RBTree<K, pair<K, V>, Mapgetfirst>::my_Iterator map_iterator;

private:
	myMap _root;

public:
	MyMap()
		:_root(myMap())
	{}

	map_iterator begin()
	{
		return _root.begin();
	}

	map_iterator end()
	{
		return _root.end();
	}

	bool Insert(const pair<K, V>& val)
	{
		return _root.Insert(val);
	}
};